package book_management.operation.impl;

import book_management.book.Book;
import book_management.book.BookList;
import book_management.operation.IOperation;

import java.util.Iterator;

public class RemoveOperation implements IOperation {
    @Override
    public void work(BookList bookList) {
        System.out.println("您现在进行的是书籍的删除操作");
        System.out.println("请输入书籍名称:");
        String name = scanner.next();

        if (bookList.isContains(name)) {
            bookList.removeBook(name);
            System.out.println("删除书籍成功~");
            return;
        }

        System.out.println("没有找到这本书!");

    }
}
